package com;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-10-27
 * Time: 21:59
 */
@Controller
public class UserController {
    //获取对象
    @Autowired
    private User user;

    public void getUser() {
        System.out.println("user: " + user);
        User user1 = user;
        user1.setName("李四");
        System.out.println("user1: " + user1);
    }
}
